import React from "react";
import ReactDOM from "react-dom";
import {Log} from '../utils/CommonUtil';

import {post, get1} from '../http/Fetch'
import URL from '../http/URL'

class HttpStu1 extends React.Component {
  state = {
    // data: {},
    imgurl: "",
    productname: "",
    cprice:''
  };

  componentDidMount() {
    let that = this;
    // get1(URL.getHttpstu1, { id: 0 }, this, function(data) {
    //   console.log(data);
    //   that.setState({
    //     imgurl: data.data.imgurl,
    //     productname: data.data.productname,
    //     cprice: data.data.cprice
    //   });
    //   console.log(that.state.imgurl);
    // });
  }

  render() {
    return <div className="index-contain">
        <button>跳转</button>
        {console.log(this.state.imgurl)}
        <div>{this.state.imgurl}</div>
        <div>{this.state.productname}</div>
        <div>{this.state.cprice}</div>
      </div>;
  }
}
export default HttpStu1;
